package com.neuedu.web.common;

import java.util.List;

/**
 * @author 金山
 * 项目：javaweb
 * site: https://blog.fulfill.com.cn
 * 描述  \
 * @data 2024/11/219:42
 */
public class PageInfo<T> {

    private Integer current = 1;
    private Integer size = 5;

    //总条数
    private Integer total;

    private Integer pages;



    private List<T> data;


    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getPages() {
        return  total%size == 0 ?  total/size :  total/size +1   ;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
